<%@ page isELIgnored="false"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<html>
<head>
  <title>学生信息编辑</title>
  <link rel="stylesheet" href="/static/layui/css/layui.css">
</head>
<body>
<form class="layui-form" action="/student/updateSave" method="post">
  <input type="hidden" name="sId" value="${student.sId}">
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">学号</label>
      <div class="layui-input-inline layui-input-wrap">
        <input type="tel" name="studentNum" value="${student.studentNum}" autocomplete="off"  lay-affix="clear" class="layui-input demo-phone">
      </div>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">姓&nbsp;&nbsp;名</label>
    <div class="layui-input-inline layui-input-wrap">
      <input type="text" name="studentName" value="${student.studentName}" lay-verify="required" autocomplete="off" lay-affix="clear" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">性&nbsp;&nbsp;别</label>
    <div class="layui-input-inline layui-input-wrap">
      <input type="text" name="gender" value="${student.gender}" lay-verify="required" autocomplete="off" lay-affix="clear" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">年&nbsp;&nbsp;龄</label>
    <div class="layui-input-inline layui-input-wrap">
      <input type="text" name="age" value="${student.age}" lay-verify="required" autocomplete="off" lay-affix="clear" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">出生日期</label>
    <div class="layui-input-inline layui-input-wrap">
      <input type="text"  id="dateOfBirth" name="dateOfBirth" value="<fmt:formatDate value="${student.dateOfBirth}" pattern="yyyy-MM-dd" />" lay-verify="required" autocomplete="off" lay-affix="clear" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button type="submit" class="layui-btn" lay-submit lay-filter="demo1">更新</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
<script>
  layui.use( function(){
    var laydate = layui.laydate;
    //渲染
    laydate.render({
      elem: '#dateOfBirth'
    });
  });

</script>
</body>
</html>